package com.eqxiu.dubbo;

import com.eqxiu.user.api.UserApi;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DubboUtil {

    public static UserApi userApi;

    public static void init(String dubboConsumerPath)
    {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"file:"+dubboConsumerPath});
        context.start();
        userApi = (UserApi) context.getBean("userApi");
    }
}
